﻿<%@ Page Language="C#" MasterPageFile="~/WebMaster.master" AutoEventWireup="true" CodeFile="AllReadings.aspx.cs" Inherits="AllReadings" Title="Untitled Page" %>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
            DataSourceID="LinqDataSource1" ForeColor="#333333" GridLines="None" 
            PageSize="30">
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <Columns>
                <asp:BoundField DataField="rd_dateTime" HeaderText="rd_dateTime" 
                    ReadOnly="True" SortExpression="rd_dateTime" />
                <asp:BoundField DataField="rd_temp" HeaderText="rd_temp" ReadOnly="True" 
                    SortExpression="rd_temp" />
                <asp:BoundField DataField="rd_humidity" HeaderText="rd_humidity" 
                    ReadOnly="True" SortExpression="rd_humidity" />
                <asp:BoundField DataField="rd_windSpeed" HeaderText="rd_windSpeed" 
                    ReadOnly="True" SortExpression="rd_windSpeed" />
                <asp:BoundField DataField="rd_currentRainfallRate" 
                    HeaderText="rd_currentRainfallRate" ReadOnly="True" 
                    SortExpression="rd_currentRainfallRate" />
                <asp:BoundField DataField="rd_rainfallToday" HeaderText="rd_rainfallToday" 
                    ReadOnly="True" SortExpression="rd_rainfallToday" />
                <asp:BoundField DataField="rd_pressure" HeaderText="rd_pressure" 
                    ReadOnly="True" SortExpression="rd_pressure" />
                <asp:BoundField DataField="rd_insideTemp" HeaderText="rd_insideTemp" 
                    ReadOnly="True" SortExpression="rd_insideTemp" />
                <asp:BoundField DataField="rd_insideHumidity" HeaderText="rd_insideHumidity" 
                    ReadOnly="True" SortExpression="rd_insideHumidity" />
            </Columns>
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="WeatherReader.WeatherDbDataContext" OrderBy="rd_dateTime desc" 
            Select="new (rd_dateTime, rd_temp, rd_humidity, rd_windSpeed, rd_currentRainfallRate, rd_rainfallToday, rd_pressure, rd_insideTemp, rd_insideHumidity)" 
            TableName="Readings">
        </asp:LinqDataSource>

</asp:Content>

